package com.kongwg4.all.dao;

import com.kongwg4.all.bean.Customer;

import java.sql.Connection;
import java.sql.Date;
import java.sql.SQLException;
import java.util.List;

/**
 * @author kongwg
 * @create 2021-01-09 22:51
 */
public interface CustomerDAO{
    /**
     * 增删改查
     */
    void insert(Connection conn,Customer cust) throws SQLException;

    void delete(Connection conn,int id) throws SQLException;

    void update(Connection conn,Customer cust) throws SQLException;

    Customer getInstance(Connection conn,int id) throws SQLException;

    List<Customer> getAll(Connection conn) throws SQLException;

    /**
     * 获取总数，生日
     */
    long getCount(Connection conn) throws SQLException;

    Date getBirth(Connection conn) throws SQLException;
}
